<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>mdeditor</title>
    <!-- 我这里用了django的模版语法，大家配置的时候按照自己的路径来就可以了 -->
    <!-- 导入css -->
    <link href="/resources/static/mdpage/plugins/editor-master/css/editormd.css" rel="stylesheet"/>
    <!-- 导入js -->
    <script src="/resources/static/mdpage/plugins/editor-master/examples/js/jquery.min.js"></script>
    <script src="/resources/static/mdpage/plugins/editor-master/editormd.js"></script>


</head>
<body>
<div id="test-editormd">
    <textarea name="content" style="display:none;"></textarea>
</div>


<script>
    var testEditor;
    $(function () {
        $.get("/resources/static/mdpage/plugins/editor-master/examples/test.md", function (md) {
            testEditor = editormd("test-editormd", {
                width: "98%",
                height: 730,
                path: '/resources/static/mdpage/plugins/editor-master/lib/',
                markdown: md,
                codeFold: true,
                saveHTMLToTextarea: true,
                searchReplace: true,
                htmlDecode: "style,script,iframe|on*",
                emoji: true,
                taskList: true,
                tocm: true,         // Using [TOCM]
                tex: true,                   // 开启科学公式TeX语言支持，默认关闭
                flowChart: true,             // 开启流程图支持，默认关闭
                sequenceDiagram: true,       // 开启时序/序列图支持，默认关闭,
                imageUpload: true,
                imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
            })
        });
    });

</script>
</body>
</html>

